#include "netclient.h"

int main(int argc, char* argv[]){
    NetClient client("127.0.0.1", 33151);
    char buf[1024];
    for(int i=0;i<100;i++){
        memset(buf, 0, 1024);
        sprintf(buf, "client %s: %d", argv[1], i);
        client.Send(buf, strlen(buf));
        memset(buf, 0, 1024);
        client.Recv(buf, 1024);
        printf("recv: %s\n", buf);
        sleep(2);
    }
    client.Close();
    return 0;
}
